get:
  summary: List Files
  description: List the files.
  tags:
    - Files
  operationId: getFiles
  parameters:
    - $ref: '../../openapi.yaml#/components/parameters/Fields'
    - $ref: '../../openapi.yaml#/components/parameters/Limit'
    - $ref: '../../openapi.yaml#/components/parameters/Offset'
    - $ref: '../../openapi.yaml#/components/parameters/Sort'
    - $ref: '../../openapi.yaml#/components/parameters/Filter'
    - $ref: '../../openapi.yaml#/components/parameters/Search'
    - $ref: '../../openapi.yaml#/components/parameters/Meta'
  responses:
    '200':
      description: Successful request
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '../../openapi.yaml#/components/schemas/Files'
              meta:
                $ref: '../../openapi.yaml#/components/schemas/x-metadata'
    '401':
      $ref: '../../openapi.yaml#/components/responses/UnauthorizedError'

post:
  summary: Create a File
  description: Create a new file
  tags:
    - Files
  operationId: createFile
  requestBody:
    content:
      application/json:
        schema:
          type: object
          properties:
            data:
              type: string
  responses:
    '200':
      description: Successful request
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '../../openapi.yaml#/components/schemas/Files'
    '401':
      $ref: '../../openapi.yaml#/components/responses/UnauthorizedError'

patch:
  summary: Update Multiple Files
  description: Update multiple files at the same time.
  tags:
    - Files
  operationId: updateFiles
  parameters:
    - $ref: '../../openapi.yaml#/components/parameters/Fields'
    - $ref: '../../openapi.yaml#/components/parameters/Limit'
    - $ref: '../../openapi.yaml#/components/parameters/Meta'
    - $ref: '../../openapi.yaml#/components/parameters/Offset'

    - $ref: '../../openapi.yaml#/components/parameters/Sort'
    - $ref: '../../openapi.yaml#/components/parameters/Filter'
    - $ref: '../../openapi.yaml#/components/parameters/Search'
  requestBody:
    content:
      application/json:
        schema:
          type: object
          properties:
            data:
              type: object
              properties:
                data:
                  type: string
            keys:
              type: array
              items:
                type: string
  responses:
    '200':
      description: Successful request
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '../../openapi.yaml#/components/schemas/Files'
              meta:
                $ref: '../../openapi.yaml#/components/schemas/x-metadata'
    '401':
      $ref: '../../openapi.yaml#/components/responses/UnauthorizedError'

delete:
  summary: Delete Multiple Files
  description: Delete multiple existing files.
  tags:
    - Files
  operationId: deleteFiles
  responses:
    '200':
      description: Successful request
    '401':
      $ref: '../../openapi.yaml#/components/responses/UnauthorizedError'
